<?php
class M_prestasi extends Nvl_Model{
	function __construct(){
		parent::__construct();
		$this->table_name='prestasi';
		$this->column_primary='id_prestasi';
		$this->column_order='';
		$this->column_unique='';
		$this->primary_filter='intval';
	}
	
	var $main_sql = "
		SELECT * FROM prestasi
		WHERE id_prestasi IS NOT NULL
	";
	
	function data_list($searchText, $start, $end){
		$sql = $this->main_sql;
		if($searchText != ''){
			$sql .= " AND lower(nama_siswa) LIKE '%". strtolower($searchText) ."%' ";
		}
		if($start != 0 || $end !=0 ){
			$sql .= " LIMIT ".$start.",".$end;
		}
		$result = $this->__coreList($sql);
		return $result;
	}
}